rf=open("loc.sql") ; c = [ """insert into zh_cn.Location("ID", "Address") values({ID}, '{addr}');\r\n""".format(ID=i, addr=addr.strip('\r\n'))  for i, addr in enumerate( rf.readlines())] ; wf=open("insert.sql", 'w') ; wf.writelines(c) ; rf.close() ; wf.close()


exec( "".join( open("poi.sql").readlines() ) )
open("poi_ok.sql", 'aw').writelines( '\r\n'.join( [ '(%s),' % (i) for i, r in enumerate(oceanpoi) ] ) )
open("poi_ok.sql", 'aw').writelines( '\r\n'.join( [ "(%s,'%s')," % (i, r[1]) for i, r in enumerate(oceanpoideep) ] ) )
open("poi_ok.sql", 'aw').writelines( '\r\n'.join( [ "(%s, '%s', '%s', '%s', '%s', '%s')," % (i, r[1], r[2], r[3], r[4], r[5]) for i, r in enumerate(zhcnpoideep) ] ) )
open("poi_ok.sql", 'aw').writelines( '\r\n'.join( [ "(%s, '%s', '%s')," % (i, r[1], r[2]) for i, r in enumerate(zhcnpoi) ] ) )

